# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer:  Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-sip4
pkgver=4.19.25
pkgrel=0
pkgdesc="Tool that makes it easy to create Python bindings for C and C++ libraries"
options="!check" # No testsuite
url="http://www.riverbankcomputing.com/software/sip/"
arch="all"
license="custom:sip"
makedepends="python3-dev"
depends_dev="py3-sip4"
subpackages="
	$pkgname-dev::noarch
	$pkgname-doc"
source="https://www.riverbankcomputing.com/static/Downloads/sip/$pkgver/sip-$pkgver.tar.gz"
builddir="$srcdir"/sip-$pkgver

build() {
	python3 configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS"
}

package() {
	make DESTDIR="$pkgdir" install

	# Move sip.h to /usr/include
	mv "$pkgdir"/usr/include/python3*/sip.h "$pkgdir"/usr/include/sip.h
	rm -rf "$pkgdir"/usr/include/python3*

	install -Dm644 "$builddir"/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
60fb4133c68869bf0993144978b4847d94a0f9c7b477f64a346ea133cfe35bc11820204ab327dcf9a929b6f65a26d16cc7efbce65e49967c3347b39376e57001  sip-4.19.25.tar.gz
"
